#include "NetElevatorToFirestCmd.h"

NetElevatorToFirestCmd::NetElevatorToFirestCmd(QObject *parent) :
    BaseCmd(parent)
{
    this->m_protocolType = ProtocolType::NetPointProtocol;
    this->m_functionCode = FunctionCode;
}

Package NetElevatorToFirestCmd::toPackage()
{
    Package package;
    package.body().clear();
    package.setFunction(FunctionCode);

    return package;
}

void NetElevatorToFirestCmd::unPackage(Package package)
{
     qDebug()<<"NetElevatorToFirestCmd::unPackage--"<<DataTypeConver::formatString(package.body());
    m_doorNumber=package.body().mid(0,1).toHex().toInt(0,16);
    printf("NetElevatorToFirestCmd,,,%d\r\n",m_doorNumber);
   Q_UNUSED(package);
}

quint16 NetElevatorToFirestCmd::doorNumber() const
{
    return m_doorNumber;
}
void NetElevatorToFirestCmd::setDoorNumber(const quint16 number)
{
    m_doorNumber = number;
}

